@grove-dev/cli 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grove-dev/cli",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "type": "module",
5
5
  "description": "Grove CLI — scaffolds Grove-powered spaces and orchestrates @grove-dev/core commands.",
6
6
  "license": "MIT",
package/dist/r/about.json CHANGED
@@ -10,14 +10,14 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "default/pages/about.astro",
13
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getAboutPageSeo,\n getPageContentHtml,\n indexSlug,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\n/**\n * About page — generic.\n *\n * A continuous narrative in three movements: what this site is →\n * how it's built (the file-first pipeline: source files → Grove →\n * multiple outputs → ongoing sync) → how to contribute. Prose\n * sections, not a stack of cards — the reading experience is the\n * point here.\n *\n * The copy is generic — references \"directory\", \"record\",\n * \"repository\" — so it works for any blueprint, and every dynamic\n * value (`siteConfig.tagline`, `siteConfig.repoUrl`, item labels)\n * flows from the site config.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\nconst githubUrl = siteConfig.repoUrl;\nconst seo = getAboutPageSeo(siteConfig);\nconst slug = indexSlug();\nconst item = itemLabel();\nconst items = itemLabelPlural();\nconst pageContentHtml = getPageContentHtml('about');\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <Container size=\"narrow\">\n <article class=\"py-12 sm:py-16\">\n <nav class=\"text-2xs text-muted-foreground\" aria-label=\"Breadcrumb\">\n <a href=\"/\" class=\"hover:text-foreground\">Home</a>\n <span class=\"mx-1.5 text-ink-300 dark:text-ink-700\">/</span>\n <span class=\"text-foreground\">About</span>\n </nav>\n\n {pageContentHtml ? (\n <section class=\"grove-prose mt-8\" set:html={pageContentHtml} />\n ) : (\n <>\n <header class=\"mt-5\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n About\n </span>\n <h1 class=\"mt-1 m-0 text-[1.75rem] sm:text-[2.25rem] font-semibold tracking-[-0.02em] leading-[1.1] text-foreground\">\n A directory that lives in files.\n </h1>\n <p class=\"mt-4 m-0 text-[1rem] sm:text-[1.0625rem] leading-relaxed text-foreground max-w-[62ch]\">\n {siteConfig.name} is a curated, health-aware directory of open-source\n {items} — and every listing you see here is a plain YAML file in a\n public repository. This website is one of the outputs generated from\n those files.\n </p>\n </header>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n Why it exists\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n GitHub search and README lists optimize for the repository name and\n description. They rarely tell you whether a project is a real {item}\n or a demo, which stack it uses beyond the headline, how active it\n really is, or whether it has a clear license.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Each entry here carries the metadata a developer actually needs\n before opening the repo: stack, platforms, license, activity and\n health signals, plus curated notes — best for, why listed, caveats.\n Everything links back to real, runnable source. No SEO spam, no\n affiliate farms, no broken links.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How it's built\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n The source of truth is a folder of files: one YAML record per\n {item}, taxonomy files for categories, stacks, platforms, and\n licenses, and Markdown for long-form notes. <a href=\"https://github.com/tortuvshin/grove\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">Grove</a> validates\n those files, joins in synced GitHub metadata, and publishes them as\n multiple outputs — this website with its search and filters, a\n generated README, an <code class=\"font-mono text-[0.875em]\">llms.txt</code> index\n for machines, and sitemap/SEO data.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Automation keeps the outputs current: weekly syncs refresh stars,\n activity, and contributor data, and every change to a source file\n rebuilds everything derived from it. There is no database and no\n server — the output is static HTML, and the content stays portable\n in files you can fork.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How to contribute\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Because the content is files, contributing is a pull request: add a\n YAML record for a new {item}, fix a typo, or improve the metadata\n behind an existing listing. The <a href=\"/submit\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">submit page</a> drafts\n the YAML for you from a repository URL, and every submission is\n reviewed against the curation bar before it lands.\n </p>\n </section>\n\n <section class=\"mt-10 flex flex-wrap items-center gap-3\">\n <a href={`/${slug}/`} class={buttonClass(\"primary\", \"sm\")}>Browse the directory</a>\n {githubUrl && (\n <a\n href={githubUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class={buttonClass(\"secondary\", \"sm\")}\n >\n View on GitHub\n </a>\n )}\n <a href=\"/submit\" class={buttonClass(\"ghost\", \"sm\")}>Submit a {item} →</a>\n </section>\n </>\n )}\n </article>\n </Container>\n</BaseLayout>\n",
13
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getAboutPageSeo,\n getPageContentHtml,\n indexSlug,\n itemLabel,\n itemLabelPlural,\n} from '@grove-dev/astro/server';\n/**\n * About page — generic.\n *\n * A continuous narrative in three movements: what this site is →\n * how it's built (the file-first pipeline: source files → Grove →\n * multiple outputs → ongoing sync) → how to contribute. Prose\n * sections, not a stack of cards — the reading experience is the\n * point here.\n *\n * The copy is generic — references \"directory\", \"record\",\n * \"repository\" — so it works for any blueprint, and every dynamic\n * value (`siteConfig.tagline`, `siteConfig.repoUrl`, item labels)\n * flows from the site config.\n */\nimport BaseLayout from '../layouts/base-layout.astro';\nimport Container from '../layouts/container.astro';\nimport { buttonClass } from '../lib/classnames.ts';\n\ntype Press = { outlet: string; title: string; url: string; date: string; logo?: string };\nconst press = ((siteConfig as { press?: Press[] }).press ?? []);\n\nconst githubUrl = siteConfig.repoUrl;\nconst seo = getAboutPageSeo(siteConfig);\nconst slug = indexSlug();\nconst item = itemLabel();\nconst items = itemLabelPlural();\nconst pageContentHtml = getPageContentHtml('about');\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <Container size=\"narrow\">\n <article class=\"py-12 sm:py-16\">\n <nav class=\"text-2xs text-muted-foreground\" aria-label=\"Breadcrumb\">\n <a href=\"/\" class=\"hover:text-foreground\">Home</a>\n <span class=\"mx-1.5 text-ink-300 dark:text-ink-700\">/</span>\n <span class=\"text-foreground\">About</span>\n </nav>\n\n {pageContentHtml ? (\n <section class=\"grove-prose mt-8\" set:html={pageContentHtml} />\n ) : (\n <>\n <header class=\"mt-5\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n About\n </span>\n <h1 class=\"mt-1 m-0 text-[1.75rem] sm:text-[2.25rem] font-semibold tracking-[-0.02em] leading-[1.1] text-foreground\">\n A directory that lives in files.\n </h1>\n <p class=\"mt-4 m-0 text-[1rem] sm:text-[1.0625rem] leading-relaxed text-foreground max-w-[62ch]\">\n {siteConfig.name} is a curated, health-aware directory of open-source\n {items} — and every listing you see here is a plain YAML file in a\n public repository. This website is one of the outputs generated from\n those files.\n </p>\n </header>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n Why it exists\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n GitHub search and README lists optimize for the repository name and\n description. They rarely tell you whether a project is a real {item}\n or a demo, which stack it uses beyond the headline, how active it\n really is, or whether it has a clear license.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Each entry here carries the metadata a developer actually needs\n before opening the repo: stack, platforms, license, activity and\n health signals, plus curated notes — best for, why listed, caveats.\n Everything links back to real, runnable source. No SEO spam, no\n affiliate farms, no broken links.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How it's built\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n The source of truth is a folder of files: one YAML record per\n {item}, taxonomy files for categories, stacks, platforms, and\n licenses, and Markdown for long-form notes. <a href=\"https://github.com/tortuvshin/grove\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">Grove</a> validates\n those files, joins in synced GitHub metadata, and publishes them as\n multiple outputs — this website with its search and filters, a\n generated README, an <code class=\"font-mono text-[0.875em]\">llms.txt</code> index\n for machines, and sitemap/SEO data.\n </p>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Automation keeps the outputs current: weekly syncs refresh stars,\n activity, and contributor data, and every change to a source file\n rebuilds everything derived from it. There is no database and no\n server — the output is static HTML, and the content stays portable\n in files you can fork.\n </p>\n </section>\n\n <section class=\"mt-10\">\n <h2 class=\"m-0 text-[1.25rem] sm:text-[1.375rem] font-semibold tracking-tight text-foreground\">\n How to contribute\n </h2>\n <p class=\"mt-3 m-0 text-[0.9375rem] leading-relaxed text-foreground\">\n Because the content is files, contributing is a pull request: add a\n YAML record for a new {item}, fix a typo, or improve the metadata\n behind an existing listing. The <a href=\"/submit\" class=\"font-medium underline decoration-border underline-offset-2 hover:decoration-ring\">submit page</a> drafts\n the YAML for you from a repository URL, and every submission is\n reviewed against the curation bar before it lands.\n </p>\n </section>\n\n <section class=\"mt-10 flex flex-wrap items-center gap-3\">\n <a href={`/${slug}/`} class={buttonClass(\"primary\", \"sm\")}>Browse the directory</a>\n {githubUrl && (\n <a\n href={githubUrl}\n target=\"_blank\"\n rel=\"noopener\"\n class={buttonClass(\"secondary\", \"sm\")}\n >\n View on GitHub\n </a>\n )}\n <a href=\"/submit\" class={buttonClass(\"ghost\", \"sm\")}>Submit a {item} →</a>\n </section>\n </>\n )}\n {press.length > 0 && (\n <section class=\"mt-12 border-t border-border pt-8\" aria-labelledby=\"press-heading\">\n <h2 id=\"press-heading\" class=\"m-0 text-[1.25rem] font-semibold tracking-tight text-foreground\">Featured in</h2>\n <ul class=\"m-0 mt-4 flex list-none flex-col gap-2 p-0\">\n {press.map((item) => (\n <li class=\"m-0\">\n <a href={item.url} target=\"_blank\" rel=\"noopener\" class=\"flex items-center gap-3 rounded-[var(--radius-lg)] border border-border bg-card p-3 no-underline hover:border-ink-400 dark:hover:border-ink-600\">\n {item.logo && (\n <span class=\"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-white p-1.5\"><img src={item.logo} alt=\"\" width=\"20\" height=\"20\" class=\"h-5 w-5\" /></span>\n )}\n <span class=\"min-w-0\">\n <span class=\"block text-sm font-semibold text-foreground\">{item.title}</span>\n <span class=\"block text-2xs text-muted-foreground\">{item.outlet} · {new Date(`${item.date}-01T00:00:00Z`).toLocaleDateString('en-US', { month: 'long', year: 'numeric', timeZone: 'UTC' })}</span>\n </span>\n </a>\n </li>\n ))}\n </ul>\n </section>\n )}\n </article>\n </Container>\n</BaseLayout>\n",
14
14
  "type": "registry:page",
15
15
  "target": "~/src/pages/about.astro"
16
16
  }
17
17
  ],
18
18
  "meta": {
19
- "version": "1.3.0",
20
- "requiresGrove": "0.18.0"
19
+ "version": "1.4.0",
20
+ "requiresGrove": "0.19.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }
@@ -95,8 +95,8 @@
95
95
  }
96
96
  ],
97
97
  "meta": {
98
- "version": "1.3.0",
99
- "requiresGrove": "0.18.0"
98
+ "version": "1.4.0",
99
+ "requiresGrove": "0.19.0"
100
100
  },
101
101
  "type": "registry:block"
102
102
  }
@@ -11,13 +11,13 @@
11
11
  "files": [
12
12
  {
13
13
  "path": "default/pages/collections/index.astro",
14
- "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionIndexModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionIndex from '../../components/grove/collection-index.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nconst collections = await loadCollections(process.cwd());\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionIndexModel(collections, entries, siteConfig);\nconst countNoun = {\n singular: siteConfig.blueprintConfig?.labelSingular ?? 'item',\n plural: siteConfig.blueprintConfig?.labelPlural ?? 'items',\n};\nconst seo = model.seo;\n---\n<BaseLayout\n title={seo?.title ?? \"Collections\"}\n description={seo?.description ?? \"Curated and generated directories of related items.\"}\n image={seo?.image}\n jsonLd={seo?.jsonLd}\n site={siteConfig}\n>\n <CollectionIndex model={model} level={1} countNoun={countNoun} />\n</BaseLayout>\n",
14
+ "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionIndexModel,\n getCollectionTiles,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport { runCollection } from '@grove-dev/core';\nimport CollectionDirectory from '../../components/grove/collection-directory.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nconst collections = await loadCollections(process.cwd());\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionIndexModel(collections, entries, siteConfig);\nconst tiles = getCollectionTiles(collections, entries, siteConfig);\nconst covered = new Set(\n collections.flatMap((c) => runCollection(c, entries).entries.map((e) => e.slug)),\n).size;\nconst seo = model.seo;\n---\n<BaseLayout\n title={seo?.title ?? \"Collections\"}\n description={seo?.description ?? \"Curated and generated directories of related items.\"}\n image={seo?.image}\n jsonLd={seo?.jsonLd}\n site={siteConfig}\n>\n <CollectionDirectory\n tiles={tiles}\n covered={covered}\n itemsLabel={siteConfig.blueprintConfig?.labelPlural ?? \"items\"}\n />\n</BaseLayout>\n",
15
15
  "type": "registry:page",
16
16
  "target": "~/src/pages/collections/index.astro"
17
17
  },
18
18
  {
19
19
  "path": "default/pages/collections/[slug].astro",
20
- "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionBodyHtml,\n getCollectionPageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionPage from '../../components/grove/collection-page.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport async function getStaticPaths() {\n const collections = await loadCollections(process.cwd());\n return collections.map((c) => ({ params: { slug: c.slug } }));\n}\n\nconst { slug } = Astro.params;\nconst collections = await loadCollections(process.cwd());\nconst collection = collections.find((c) => c.slug === slug);\nif (!collection) return Astro.redirect('/404');\n\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionPageModel(collection, entries, collections, siteConfig);\nconst bodyHtml = getCollectionBodyHtml(collection.content);\n---\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <CollectionPage\n model={model}\n bodyHtml={bodyHtml}\n eyebrow={model.collection.kind === \"curated\" ? \"Curated collection\" : \"Generated collection\"}\n countNoun={{\n singular: siteConfig.blueprintConfig?.labelSingular ?? \"item\",\n plural: siteConfig.blueprintConfig?.labelPlural ?? \"items\",\n }}\n />\n</BaseLayout>\n",
20
+ "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionBodyHtml,\n getCollectionPageModel,\n getCollectionTiles,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionPage from '../../components/grove/collection-page.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport async function getStaticPaths() {\n const collections = await loadCollections(process.cwd());\n return collections.map((c) => ({ params: { slug: c.slug } }));\n}\n\nconst { slug } = Astro.params;\nconst collections = await loadCollections(process.cwd());\nconst collection = collections.find((c) => c.slug === slug);\nif (!collection) return Astro.redirect('/404');\n\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionPageModel(collection, entries, collections, siteConfig);\nconst bodyHtml = getCollectionBodyHtml(collection.content);\nconst relatedTiles = getCollectionTiles(\n model.related.flatMap((r) => collections.filter((c) => c.slug === r.slug)),\n entries,\n siteConfig,\n);\n---\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <CollectionPage\n model={model}\n bodyHtml={bodyHtml}\n relatedTiles={relatedTiles}\n countNoun={{\n singular: siteConfig.blueprintConfig?.labelSingular ?? \"item\",\n plural: siteConfig.blueprintConfig?.labelPlural ?? \"items\",\n }}\n />\n</BaseLayout>\n",
21
21
  "type": "registry:page",
22
22
  "target": "~/src/pages/collections/[slug].astro"
23
23
  },
@@ -29,7 +29,7 @@
29
29
  },
30
30
  {
31
31
  "path": "default/components/grove/collection-page.astro",
32
- "content": "---\nimport type { CollectionPageModel } from '@grove-dev/astro/server';\n/**\n * CollectionPage — renders a single curated/generated collection.\n *\n * Consumes a `CollectionPageModel` produced by `getCollectionPageModel`.\n * Renders the header via `SectionHeader` (framework consistency),\n * the matched entries via `CollectionRow`, and a related-collections\n * section.\n *\n * Editorial layers, each rendered only when the collection has it:\n * `editorial.introduction` (lead paragraph), the selection criteria,\n * the Markdown body (`bodyHtml`, from `getCollectionBodyHtml`), and the\n * `faq`. When the curator wrote per-entry notes the entries render as a\n * numbered verdict list — a card clamps its description to two lines,\n * which is no place for a 40-word verdict — and otherwise as the card\n * grid.\n *\n * Generic: no blueprint-specific copy. Consumers can override\n * `eyebrow`, `title`, `description`; `<slot name=\"intro\">` takes any\n * extra markup. `emptyLabel` matches `RecordSection`'s API for\n * empty-state copy.\n */\nimport { formatCount, formatStars } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport SectionHeader from '../../layouts/section-header.astro';\nimport EmptyState from '../ui/empty-state.astro';\nimport CardGrid from './card-grid.astro';\nimport CollectionRow from './collection-row.astro';\n\ninterface Props {\n model: CollectionPageModel;\n /** Sanitized HTML of the collection's Markdown body, if it has one. */\n bodyHtml?: string | null;\n /** Override the eyebrow text (default: derived from collection kind). */\n eyebrow?: string;\n /** Override the title (default: collection.title). */\n title?: string;\n /** Override the description (default: collection.description). */\n description?: string;\n /** Default copy when the collection has no matching entries. */\n emptyLabel?: string;\n /** Section id (deep link + stable key). */\n id?: string;\n /**\n * Heading level for the collection title. This component IS the\n * page on collection detail routes, so it defaults to 1.\n */\n level?: 1 | 2;\n /** Noun pair for the entry count (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n class?: string;\n}\n\nconst {\n model,\n bodyHtml = null,\n eyebrow,\n title,\n description,\n emptyLabel = 'This collection is currently empty.',\n id,\n level = 1,\n countNoun = { singular: 'item', plural: 'items' },\n class: className = '',\n} = Astro.props;\n\nconst finalTitle = title ?? model.collection.title;\nconst finalDescription = description ?? model.collection.description;\nconst hasNotes = model.entries.some((entry) => entry.note);\nconst reviewedLabel = model.collection.lastReviewedAt\n ? new Date(model.collection.lastReviewedAt).toLocaleDateString('en', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n timeZone: 'UTC',\n })\n : null;\nconst finalEyebrow =\n eyebrow ?? (model.collection.kind === 'curated' ? 'Curated collection' : 'Generated collection');\n---\n\n<section id={id} class={`py-12 sm:py-16 ${className}`}>\n <Container>\n <SectionHeader eyebrow={finalEyebrow} title={finalTitle} description={finalDescription} level={level} />\n\n {model.collection.introduction && (\n <p class=\"m-0 mb-6 max-w-[68ch] text-[1.0625rem] leading-relaxed text-foreground\">\n {model.collection.introduction}\n </p>\n )}\n\n {/* Editorial context reads as a quiet callout, not metadata\n shouting in uppercase. */}\n {model.collection.selectionNote && (\n <aside class=\"mb-6 max-w-[64ch] rounded-[var(--radius-lg)] border-l-2 border-border bg-surface-sunken px-4 py-3\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n Selection criteria\n </p>\n <p class=\"m-0 mt-1 text-[0.875rem] leading-relaxed text-foreground\">\n {model.collection.selectionNote}\n </p>\n </aside>\n )}\n\n <slot name=\"intro\" />\n\n {/* Bridges the heading outline: the page title is an h1 and the\n entry cards render h3 titles — without this h2 Lighthouse\n flags a heading-order skip. */}\n <h2 class=\"sr-only\">Entries</h2>\n <p class=\"m-0 mb-4 text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n {formatCount(model.total, countNoun)}\n </p>\n\n {model.isEmpty ? (\n <EmptyState\n title={emptyLabel}\n description=\"No records currently match this collection's query. The collection fills automatically as matching records are added.\"\n />\n ) : hasNotes ? (\n <ol class=\"m-0 flex list-none flex-col gap-3 p-0\">\n {model.entries.map((entry, i) => (\n <li class=\"m-0 rounded-[var(--radius-lg)] border border-border bg-card p-4 sm:p-5\">\n <h3 class=\"m-0 text-[1.0625rem] font-semibold leading-snug text-foreground\">\n <span class=\"mr-2 tabular-nums text-muted-foreground\">{i + 1}.</span>\n <a href={entry.url} class=\"text-foreground no-underline hover:underline\">{entry.title}</a>\n </h3>\n <p class=\"m-0 mt-2 max-w-[72ch] text-[0.9375rem] leading-relaxed text-foreground\">\n {entry.note ?? entry.description}\n </p>\n <p class=\"m-0 mt-3 flex flex-wrap gap-x-4 gap-y-1 text-2xs text-muted-foreground\">\n {typeof entry.stars === 'number' && entry.stars > 0 && (\n <span>{formatStars(entry.stars)} stars</span>\n )}\n {(entry.licenses?.[0] ?? entry.license) && <span>{entry.licenses?.[0] ?? entry.license}</span>}\n {entry.stack && <span>{entry.stack}</span>}\n {entry.repoHref && (\n <a href={entry.repoHref} rel=\"noopener noreferrer\" target=\"_blank\" class=\"text-muted-foreground underline\">\n Source\n </a>\n )}\n </p>\n </li>\n ))}\n </ol>\n ) : (\n <CardGrid>\n {model.entries.map((entry, i) => (\n <li class=\"m-0 p-0\">\n <CollectionRow entry={entry} eager={i < 3} />\n </li>\n ))}\n </CardGrid>\n )}\n\n {bodyHtml && <div class=\"grove-prose mt-12 max-w-[72ch]\" set:html={bodyHtml} />}\n\n {model.faq.length > 0 && (\n <section class=\"mt-12 max-w-[72ch]\">\n <h2 class=\"m-0 mb-4 text-[1.375rem] font-semibold tracking-tight text-foreground\">\n Frequently asked questions\n </h2>\n <dl class=\"m-0 flex flex-col gap-5\">\n {model.faq.map((item) => (\n <div>\n <dt class=\"m-0 text-[1rem] font-semibold text-foreground\">{item.q}</dt>\n <dd class=\"m-0 mt-1 text-[0.9375rem] leading-relaxed text-foreground\">{item.a}</dd>\n </div>\n ))}\n </dl>\n </section>\n )}\n\n {reviewedLabel && (\n <p class=\"m-0 mt-8 text-2xs text-muted-foreground\">\n Last reviewed <time datetime={model.collection.lastReviewedAt}>{reviewedLabel}</time>\n </p>\n )}\n\n {model.related.length > 0 && (\n <section class=\"mt-12 border-t border-ink-200 pt-8 dark:border-ink-800\">\n <SectionHeader\n eyebrow=\"Related\"\n title=\"Related collections\"\n description=\"Other curated groupings of related items.\"\n level={2}\n />\n <ul class=\"m-0 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-2 lg:grid-cols-4\">\n {model.related.map((r) => (\n <li class=\"m-0 p-0\">\n <a\n href={r.url}\n class=\"group flex h-full flex-col gap-1 rounded-md border border-ink-200 bg-white px-3 py-2.5 no-underline transition-colors hover:border-ink-400 dark:border-ink-800 dark:bg-ink-950 dark:hover:border-ink-600\"\n >\n <span class=\"text-sm font-medium text-ink-900 group-hover:underline dark:text-ink-100\">{r.title}</span>\n </a>\n </li>\n ))}\n </ul>\n </section>\n )}\n </Container>\n</section>\n",
32
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport type { CollectionPageModel, CollectionTile as Tile } from '@grove-dev/astro/server';\n/**\n * CollectionPage — renders a single curated/generated collection.\n *\n * Consumes a `CollectionPageModel` produced by `getCollectionPageModel`.\n *\n * First screen: a header band with the kind (editor's picks when the\n * curator wrote per-entry notes, otherwise a live view), the title, the\n * verdict (`editorial.introduction`, falling back to the description),\n * faces of the entries, the count and the review date.\n *\n * Entries: editor's picks render as numbered cards with the note, tags,\n * stars / last push / licence and Website (with `ref`) and Source\n * links; live views render as a two-column grid of ranked cards. A\n * sticky rail on wide screens holds the page outline and a submit\n * prompt. Below: the Markdown body (`bodyHtml`), \"How we picked\"\n * (`selectionNote`), the FAQ and related collections — as cards when\n * `relatedTiles` is passed.\n *\n * Generic: no blueprint-specific copy. Consumers can override\n * `eyebrow`, `title`, `description`; `<slot name=\"intro\">` takes any\n * extra markup.\n */\nimport { formatCount, withRef } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport SectionHeader from '../../layouts/section-header.astro';\nimport { buttonClass } from '../../lib/classnames.ts';\nimport EmptyState from '../ui/empty-state.astro';\nimport CollectionTile from './collection-tile.astro';\nimport Avatar from './entry-avatar.astro';\nimport Chips from './entry-chips.astro';\nimport Metrics from './entry-metrics.astro';\n\ninterface Props {\n model: CollectionPageModel;\n /** Sanitized HTML of the collection's Markdown body, if it has one. */\n bodyHtml?: string | null;\n /** Override the eyebrow text (default: \"Editor's picks\" / \"Live view\"). */\n eyebrow?: string;\n /** Override the title (default: collection.title). */\n title?: string;\n /** Override the lead (default: introduction, else description). */\n description?: string;\n /** Default copy when the collection has no matching entries. */\n emptyLabel?: string;\n /** Section id (deep link + stable key). */\n id?: string;\n /** Heading level for the collection title (the page's h1 by default). */\n level?: 1 | 2;\n /** Noun pair for the entry count (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n /** Cards for related collections (`getCollectionTiles`); plain links otherwise. */\n relatedTiles?: Tile[];\n /** Where the rail's \"Know one that fits?\" prompt points. Empty hides it. */\n submitHref?: string;\n class?: string;\n}\n\nconst {\n model,\n bodyHtml = null,\n eyebrow,\n title,\n description,\n emptyLabel = 'This collection is currently empty.',\n id,\n level = 1,\n countNoun = { singular: 'item', plural: 'items' },\n relatedTiles = [],\n submitHref = '/submit/',\n class: className = '',\n} = Astro.props;\n\nconst Heading = `h${level}` as 'h1' | 'h2';\nconst editorial = model.entries.some((entry) => entry.note);\nconst finalTitle = title ?? model.collection.title;\nconst verdict = description ?? model.collection.introduction ?? model.collection.description;\nconst finalEyebrow = eyebrow ?? (editorial ? \"Editor's picks\" : 'Live view');\nconst countText = formatCount(model.total, countNoun);\nconst reviewedText = model.collection.lastReviewedAt\n ? new Date(model.collection.lastReviewedAt).toLocaleDateString('en', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n timeZone: 'UTC',\n })\n : null;\nconst outbound = (siteConfig as { outbound?: { ref?: string | false; skipHosts?: string[] } }).outbound ?? {};\nconst faces = model.entries.filter((e) => e.avatarUrl).slice(0, 6);\nconst jumpLinks = [\n model.isEmpty ? null : { href: '#entries', label: editorial ? `The ${countText}` : `All ${countText}` },\n model.collection.selectionNote ? { href: '#how-we-picked', label: 'How we picked' } : null,\n model.faq.length > 0 ? { href: '#faq', label: 'Questions' } : null,\n model.related.length > 0 ? { href: '#related', label: 'Related collections' } : null,\n].filter((link): link is { href: string; label: string } => link !== null);\n---\n\n<section id={id} class={className}>\n <div class=\"border-b border-border bg-surface-sunken/60\">\n <Container>\n <header class=\"max-w-[76ch] py-10 sm:py-14\">\n <nav aria-label=\"Breadcrumb\" class=\"flex items-center gap-2 text-2xs text-muted-foreground\">\n <a href=\"/collections/\" class=\"text-muted-foreground no-underline hover:text-foreground hover:underline\">Collections</a>\n <span aria-hidden=\"true\">/</span>\n {editorial ? (\n <span class=\"inline-flex items-center rounded-full bg-emerald-500/10 px-2 py-0.5 font-semibold text-emerald-700 dark:text-emerald-300\">{finalEyebrow}</span>\n ) : (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 font-semibold text-secondary-foreground\"><span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>{finalEyebrow}</span>\n )}\n </nav>\n <Heading class=\"m-0 mt-4 text-[2rem] font-semibold leading-[1.1] tracking-tight text-foreground sm:text-[2.625rem]\">{finalTitle}</Heading>\n {verdict && <p class=\"m-0 mt-4 text-[1.0625rem] leading-relaxed text-foreground sm:text-[1.125rem]\">{verdict}</p>}\n <div class=\"mt-5 flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-muted-foreground\">\n {faces.length > 0 && (\n <span class=\"flex -space-x-2\" aria-hidden=\"true\">\n {faces.map((e) => (\n <img src={e.avatarUrl} alt=\"\" width=\"28\" height=\"28\" decoding=\"async\" class=\"h-7 w-7 rounded-full border-2 border-background bg-secondary object-cover\" />\n ))}\n </span>\n )}\n <span class=\"font-medium text-foreground\">{countText}</span>\n {reviewedText && <span>Reviewed <time datetime={model.collection.lastReviewedAt}>{reviewedText}</time></span>}\n </div>\n </header>\n </Container>\n </div>\n\n <Container>\n <div class=\"grid gap-10 py-10 lg:grid-cols-[minmax(0,1fr)_15rem] lg:gap-12\">\n <div class=\"min-w-0\">\n {jumpLinks.length > 1 && (\n <nav aria-label=\"On this page\" class=\"mb-8 lg:hidden\">\n <ul class=\"m-0 flex list-none flex-wrap gap-2 p-0\">\n {jumpLinks.map((link) => (\n <li class=\"m-0\"><a href={link.href} class={buttonClass('outline', 'sm')}>{link.label}</a></li>\n ))}\n </ul>\n </nav>\n )}\n\n <slot name=\"intro\" />\n\n <section id=\"entries\" aria-labelledby=\"entries-heading\" class=\"scroll-mt-20\">\n <h2 id=\"entries-heading\" class=\"m-0 mb-4 text-[1.375rem] font-semibold tracking-tight text-foreground\">\n {editorial ? `The ${countText}` : `All ${countText}, ranked`}\n </h2>\n\n {model.isEmpty ? (\n <EmptyState\n title={emptyLabel}\n description=\"No records currently match this collection's query. The collection fills automatically as matching records are added.\"\n />\n ) : editorial ? (\n <ol class=\"m-0 flex list-none flex-col gap-4 p-0\">\n {model.entries.map((entry, i) => {\n const website = withRef(entry.homepageHref, outbound);\n return (\n <li id={`pick-${entry.slug}`} class=\"m-0 scroll-mt-20 rounded-[var(--radius-lg)] border border-border bg-card p-5 sm:p-6\">\n <div class=\"flex items-start gap-4\">\n <Avatar src={entry.avatarUrl} title={entry.title} size=\"lg\" />\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"m-0 flex flex-wrap items-baseline gap-x-2 text-[1.1875rem] font-semibold leading-snug text-foreground\">\n <span class=\"tabular-nums text-muted-foreground\">{i + 1}.</span>\n <a href={entry.url} class=\"text-foreground no-underline hover:underline\">{entry.title}</a>\n </h3>\n <Metrics stars={entry.stars} pushedAt={entry.pushedAt} license={entry.licenses?.[0] ?? entry.license} />\n </div>\n </div>\n <p class=\"m-0 mt-4 max-w-[72ch] text-[0.9375rem] leading-relaxed text-foreground\">{entry.note ?? entry.description}</p>\n <Chips items={(entry.tags ?? []).slice(0, 4)} />\n <div class=\"mt-4 flex flex-wrap items-center gap-2 border-t border-border pt-4\">\n {website && (\n <a href={website} rel=\"noopener\" target=\"_blank\" class={buttonClass('secondary', 'sm')} data-event=\"homepage_click\" data-event-source=\"collection_pick\" data-event-item={entry.slug}>\n Website<span class=\"sr-only\"> of {entry.title}</span>\n </a>\n )}\n {entry.repoHref && (\n <a href={entry.repoHref} rel=\"noopener\" target=\"_blank\" class={buttonClass('ghost', 'sm')} data-event=\"external_repo_click\" data-event-source=\"collection_pick\" data-event-item={entry.slug}>\n Source<span class=\"sr-only\"> code of {entry.title}</span>\n </a>\n )}\n <a href={entry.url} class=\"ml-auto text-sm font-medium text-muted-foreground no-underline hover:text-foreground hover:underline\">Full page →</a>\n </div>\n </li>\n );\n })}\n </ol>\n ) : (\n <ol class=\"m-0 grid list-none grid-cols-1 gap-3 p-0 md:grid-cols-2\">\n {model.entries.map((entry, i) => (\n <li id={`pick-${entry.slug}`} class=\"group relative m-0 flex scroll-mt-20 flex-col rounded-[var(--radius-lg)] border border-border bg-card p-4 transition-[border-color,box-shadow] focus-within:border-ring hover:border-ink-300 hover:shadow-md dark:hover:border-ink-700\">\n <div class=\"flex items-start gap-3\">\n <Avatar src={entry.avatarUrl} title={entry.title} />\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"m-0 text-[1rem] font-semibold leading-snug text-foreground\">\n <a href={entry.url} class=\"text-foreground no-underline outline-none after:absolute after:inset-0 after:content-[''] group-hover:underline\">{entry.title}</a>\n </h3>\n {entry.stack && <p class=\"m-0 mt-0.5 text-2xs text-muted-foreground\">{entry.stack}</p>}\n </div>\n <span class=\"shrink-0 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold tabular-nums text-secondary-foreground\" aria-label={`Rank ${i + 1}`}>#{i + 1}</span>\n </div>\n <p class=\"m-0 mt-3 line-clamp-2 text-sm leading-relaxed text-muted-foreground\">{entry.description}</p>\n <Chips items={(entry.tags ?? []).slice(0, 3)} />\n <div class=\"mt-auto pt-3\">\n <Metrics stars={entry.stars} pushedAt={entry.pushedAt} license={entry.licenses?.[0] ?? entry.license} bordered />\n </div>\n </li>\n ))}\n </ol>\n )}\n </section>\n\n {bodyHtml && <div class=\"grove-prose mt-12 max-w-[76ch]\" set:html={bodyHtml} />}\n\n {model.collection.selectionNote && (\n <details id=\"how-we-picked\" class=\"group mt-12 max-w-[76ch] scroll-mt-20 rounded-[var(--radius-lg)] border border-border bg-surface-sunken\">\n <summary class=\"flex cursor-pointer list-none items-center justify-between gap-3 rounded-[var(--radius-lg)] px-4 py-3 outline-none focus-visible:ring-3 focus-visible:ring-ring/35 [&::-webkit-details-marker]:hidden\">\n <h2 class=\"m-0 text-[1rem] font-semibold text-foreground\">How we picked</h2>\n <span aria-hidden=\"true\" class=\"text-muted-foreground transition-transform group-open:rotate-45\">+</span>\n </summary>\n <p class=\"m-0 px-4 pb-4 text-[0.9375rem] leading-relaxed text-foreground\">\n {model.collection.selectionNote.trim().replace(/\\s*\\n\\s*/g, ' ')}\n </p>\n </details>\n )}\n\n {model.faq.length > 0 && (\n <section id=\"faq\" class=\"mt-12 max-w-[76ch] scroll-mt-20\">\n <h2 class=\"m-0 mb-4 text-[1.375rem] font-semibold tracking-tight text-foreground\">Frequently asked questions</h2>\n <dl class=\"m-0 flex flex-col gap-5\">\n {model.faq.map((item) => (\n <div>\n <dt class=\"m-0 text-[1rem] font-semibold text-foreground\">{item.q}</dt>\n <dd class=\"m-0 mt-1 text-[0.9375rem] leading-relaxed text-foreground\">{item.a}</dd>\n </div>\n ))}\n </dl>\n </section>\n )}\n </div>\n\n <aside class=\"hidden lg:block\" data-pagefind-ignore>\n <div class=\"sticky top-20 flex flex-col gap-4\">\n {jumpLinks.length > 1 && (\n <nav aria-label=\"On this page\" class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <p class=\"m-0 px-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">On this page</p>\n <ul class=\"m-0 mt-2 flex list-none flex-col p-0\">\n {jumpLinks.map((link) => (\n <li class=\"m-0\"><a href={link.href} class=\"block rounded-[var(--radius)] px-2 py-1.5 text-sm text-foreground no-underline hover:bg-accent\">{link.label}</a></li>\n ))}\n </ul>\n </nav>\n )}\n {submitHref && (\n <div class=\"rounded-[var(--radius-lg)] border border-dashed border-border p-4\">\n <p class=\"m-0 text-sm font-semibold text-foreground\">Know one that fits?</p>\n <p class=\"m-0 mt-1 text-2xs leading-relaxed text-muted-foreground\">Submit it with one pull request. The page credits you.</p>\n <a href={submitHref} class={buttonClass('secondary', 'sm', 'mt-3 w-full justify-center')}>Submit {countNoun.singular === 'item' ? 'an entry' : `a ${countNoun.singular}`}</a>\n </div>\n )}\n </div>\n </aside>\n </div>\n\n {model.related.length > 0 && (\n <section id=\"related\" data-pagefind-ignore class=\"scroll-mt-20 border-t border-border pb-16 pt-10\">\n <SectionHeader eyebrow=\"Related\" title=\"Related collections\" level={2} />\n {relatedTiles.length > 0 ? (\n <ul class=\"m-0 grid list-none grid-cols-1 gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {relatedTiles.map((tile) => <li class=\"m-0 p-0\"><CollectionTile tile={tile} eventSource=\"collection_related\" /></li>)}\n </ul>\n ) : (\n <ul class=\"m-0 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-2 lg:grid-cols-4\">\n {model.related.map((r) => (\n <li class=\"m-0 p-0\"><a href={r.url} class=\"flex h-full rounded-md border border-border bg-card px-3 py-2.5 text-sm font-medium text-foreground no-underline hover:underline\">{r.title}</a></li>\n ))}\n </ul>\n )}\n </section>\n )}\n </Container>\n</section>\n",
33
33
  "type": "registry:component",
34
34
  "target": "~/src/components/grove/collection-page.astro"
35
35
  },
@@ -50,11 +50,41 @@
50
50
  "content": "---\nimport type { CollectionIndexModel } from '@grove-dev/astro/server';\n/**\n * CollectionTeaser — homepage-friendly subset of `CollectionIndex`.\n *\n * Thin wrapper that defaults `limit` to 3 and sets homepage-friendly\n * \"View all collections\" link + copy. For custom card counts or\n * different copy, use `CollectionIndex` directly with explicit\n * `limit` and `viewAllHref` props.\n */\nimport CollectionIndex from './collection-index.astro';\n\ninterface Props {\n model: CollectionIndexModel;\n title?: string;\n description?: string;\n viewAllHref?: string;\n viewAllLabel?: string;\n /** Cap the number of cards rendered. Default: 3. */\n limit?: number;\n /** Noun pair for the per-card entry counts (blueprint labels). */\n countNoun?: { singular: string; plural: string };\n class?: string;\n}\n\nconst {\n model,\n title = 'Featured collections',\n description = 'Hand-picked and auto-generated groupings of related items.',\n viewAllHref = '/collections/',\n viewAllLabel = 'View all collections',\n limit = 3,\n countNoun,\n class: className,\n} = Astro.props;\n---\n\n<CollectionIndex\n model={model}\n title={title}\n description={description}\n viewAllHref={viewAllHref}\n viewAllLabel={viewAllLabel}\n limit={limit}\n countNoun={countNoun}\n class={className}\n/>\n",
51
51
  "type": "registry:component",
52
52
  "target": "~/src/components/grove/collection-teaser.astro"
53
+ },
54
+ {
55
+ "path": "default/components/grove/collection-directory.astro",
56
+ "content": "---\n/**\n * CollectionDirectory — the /collections/ page.\n *\n * A short header with the two kinds of collection as a legend, one\n * featured editor's-picks collection with its first picks, then every\n * other collection as a card. Tiles come from `getCollectionTiles`.\n * The featured slot goes to the most recently reviewed non-empty\n * collection with curator notes; with none, every tile is in the grid.\n */\nimport type { CollectionTile as Tile } from '@grove-dev/astro/server';\nimport { formatStars } from '@grove-dev/core';\nimport Container from '../../layouts/container.astro';\nimport { buttonClass } from '../../lib/classnames.ts';\nimport EmptyState from '../ui/empty-state.astro';\nimport CollectionTile from './collection-tile.astro';\n\ninterface Props {\n tiles: Tile[];\n /** Distinct entries across all collections, for the header line. */\n covered?: number;\n itemsLabel?: string;\n title?: string;\n description?: string;\n}\n\nconst {\n tiles,\n covered,\n itemsLabel = 'items',\n title = 'Collections',\n description = 'Shortlists for a question you already have, and live views that re-rank as the directory changes.',\n} = Astro.props;\n\nconst featured = tiles\n .filter((t) => t.editorial && !t.isEmpty && t.reviewedAt)\n .sort((a, b) => Date.parse(b.reviewedAt ?? '') - Date.parse(a.reviewedAt ?? ''))[0];\nconst rest = tiles.filter((t) => t !== featured);\nconst reviewedText = (date?: string) =>\n date\n ? new Date(date).toLocaleDateString('en', { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' })\n : undefined;\n---\n\n<section class=\"border-b border-border pb-10 pt-12 sm:pb-12 sm:pt-16\">\n <Container>\n <div class=\"flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between\">\n <div class=\"max-w-[60ch]\">\n <p class=\"m-0 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n {tiles.length} collections{typeof covered === 'number' && covered > 0 ? ` · ${covered} ${itemsLabel} covered` : ''}\n </p>\n <h1 class=\"m-0 mt-2 text-[2rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2.625rem]\">{title}</h1>\n <p class=\"m-0 mt-3 text-[1.0625rem] leading-relaxed text-muted-foreground\">{description}</p>\n </div>\n <dl class=\"m-0 grid gap-2 text-sm sm:grid-cols-2 lg:w-[30rem]\">\n <div class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <dt class=\"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/10 px-2 py-0.5 text-2xs font-semibold text-emerald-700 dark:text-emerald-300\">Editor's picks</dt>\n <dd class=\"m-0 mt-2 text-2xs leading-relaxed text-muted-foreground\">A person chose each entry and wrote down why. Dated reviews.</dd>\n </div>\n <div class=\"rounded-[var(--radius-lg)] border border-border bg-card p-3\">\n <dt class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold text-secondary-foreground\">\n <span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>Live view\n </dt>\n <dd class=\"m-0 mt-2 text-2xs leading-relaxed text-muted-foreground\">Fixed rules over the directory, re-ranked on every sync.</dd>\n </div>\n </dl>\n </div>\n </Container>\n</section>\n\n{tiles.length === 0 && (\n <section class=\"py-12\">\n <Container>\n <EmptyState title=\"No collections yet\" description=\"Add a YAML file to data/collections/ and it appears here.\" />\n </Container>\n </section>\n)}\n\n{featured && (\n <section aria-labelledby=\"featured-heading\" class=\"pt-10 sm:pt-12\">\n <Container>\n <article class=\"grid overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card lg:grid-cols-2\">\n <div class=\"flex min-w-0 flex-col p-6 sm:p-8\">\n <p class=\"m-0 flex items-center gap-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">\n <span class=\"inline-flex items-center rounded-full bg-emerald-500/10 px-2 py-0.5 font-semibold normal-case tracking-normal text-emerald-700 dark:text-emerald-300\">Featured</span>\n Editor's picks\n </p>\n <h2 id=\"featured-heading\" class=\"m-0 mt-4 text-[1.625rem] font-semibold leading-tight tracking-tight text-foreground sm:text-[2rem]\">\n <a href={featured.url} class=\"text-foreground no-underline hover:underline\">{featured.title}</a>\n </h2>\n {featured.takeaway && <p class=\"m-0 mt-4 max-w-[58ch] text-[0.9375rem] leading-relaxed text-foreground\">{featured.takeaway}</p>}\n <div class=\"mt-auto flex flex-wrap items-center gap-x-4 gap-y-2 pt-6\">\n <a href={featured.url} class={buttonClass('primary', 'md')} data-event=\"collection_card_click\" data-event-source=\"collection_featured\" data-event-item={featured.slug}>See the picks →</a>\n <span class=\"text-2xs text-muted-foreground\">\n {featured.countLabel}\n {reviewedText(featured.reviewedAt) && <> · Reviewed <time datetime={featured.reviewedAt}>{reviewedText(featured.reviewedAt)}</time></>}\n </span>\n </div>\n </div>\n {featured.examples.length > 0 && (\n <div class=\"min-w-0 border-t border-border bg-surface-sunken p-4 sm:p-6 lg:border-l lg:border-t-0\">\n <h3 class=\"m-0 px-2 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">Quick picks</h3>\n <ol class=\"m-0 mt-2 flex list-none flex-col p-0\">\n {featured.examples.map((ex, i) => (\n <li class=\"m-0\">\n <a href={`${featured.url}#pick-${ex.slug}`} class=\"group flex items-start gap-3 rounded-[var(--radius)] px-2 py-2.5 no-underline hover:bg-accent\">\n {ex.avatarUrl ? (\n <img src={ex.avatarUrl} alt=\"\" width=\"36\" height=\"36\" loading=\"lazy\" decoding=\"async\" class=\"h-9 w-9 shrink-0 rounded-lg border border-border bg-background object-cover\" />\n ) : (\n <span class=\"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border bg-background text-xs font-semibold text-muted-foreground\">{i + 1}</span>\n )}\n <span class=\"min-w-0 flex-1\">\n <span class=\"flex items-baseline justify-between gap-3\">\n <span class=\"text-[0.9375rem] font-semibold text-foreground group-hover:underline\">{ex.title}</span>\n {typeof ex.stars === 'number' && ex.stars > 0 && <span class=\"shrink-0 text-2xs tabular-nums text-muted-foreground\">★ {formatStars(ex.stars)}</span>}\n </span>\n {ex.note && <span class=\"mt-0.5 line-clamp-2 block text-sm leading-snug text-muted-foreground\">{ex.note}</span>}\n </span>\n </a>\n </li>\n ))}\n </ol>\n </div>\n )}\n </article>\n </Container>\n </section>\n)}\n\n{rest.length > 0 && (\n <section aria-labelledby=\"all-collections\" class=\"pb-16 pt-12\">\n <Container>\n <h2 id=\"all-collections\" class=\"m-0 mb-4 text-[1.25rem] font-semibold tracking-tight text-foreground\">\n {featured ? 'More collections' : 'All collections'}\n </h2>\n <ul class=\"m-0 grid list-none grid-cols-1 gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {rest.map((tile) => <li class=\"m-0 p-0\"><CollectionTile tile={tile} /></li>)}\n </ul>\n </Container>\n </section>\n)}\n",
57
+ "type": "registry:component",
58
+ "target": "~/src/components/grove/collection-directory.astro"
59
+ },
60
+ {
61
+ "path": "default/components/grove/collection-tile.astro",
62
+ "content": "---\n/**\n * CollectionTile — one collection as a card: kind, title, a one-line\n * takeaway, faces of the entries inside and the review date. Used on\n * /collections/ and for \"Related collections\" on a collection page.\n * Takes a tile from `getCollectionTiles`.\n */\nimport type { CollectionTile } from '@grove-dev/astro/server';\n\ninterface Props {\n tile: CollectionTile;\n headingLevel?: 'h2' | 'h3';\n /** Small label above the title, e.g. the reader's intent. */\n label?: string;\n eventSource?: string;\n}\n\nconst { tile, headingLevel: Heading = 'h3', label, eventSource = 'collection_index' } = Astro.props;\nconst faces = tile.faces.slice(0, 5);\nconst extra = Math.max(0, tile.count - faces.length);\nconst names = tile.examples.slice(0, 2).map((e) => e.title);\nconst namesText = names.length\n ? `${names.join(', ')}${tile.count > names.length ? ` and ${tile.count - names.length} more` : ''}`\n : '';\nconst reviewedText = tile.reviewedAt\n ? new Date(tile.reviewedAt).toLocaleDateString('en', { year: 'numeric', month: 'short', day: 'numeric', timeZone: 'UTC' })\n : undefined;\n---\n\n<a\n href={tile.url}\n data-event=\"collection_card_click\"\n data-event-source={eventSource}\n data-event-item={tile.slug}\n class=\"group flex h-full min-w-0 flex-col rounded-[var(--radius-lg)] border border-border bg-card p-5 no-underline outline-none transition-[border-color,box-shadow,transform] hover:-translate-y-0.5 hover:border-ink-300 hover:shadow-md focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 dark:hover:border-ink-700\"\n>\n <div class=\"flex items-center justify-between gap-3\">\n {tile.editorial ? (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/10 px-2 py-0.5 text-2xs font-semibold text-emerald-700 dark:text-emerald-300\">\n <svg viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" aria-hidden=\"true\" fill=\"currentColor\"><path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path></svg>\n Editor's picks\n </span>\n ) : (\n <span class=\"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-semibold text-secondary-foreground\">\n <span class=\"h-1.5 w-1.5 rounded-full bg-success\" aria-hidden=\"true\"></span>\n Live view\n </span>\n )}\n <span class=\"text-2xs tabular-nums text-muted-foreground\">{tile.countLabel}</span>\n </div>\n\n {label && <p class=\"m-0 mt-4 text-2xs font-medium uppercase tracking-wider text-muted-foreground\">{label}</p>}\n <Heading class:list={[\"m-0 text-[1.125rem] font-semibold leading-snug tracking-tight text-foreground group-hover:underline\", label ? \"mt-1\" : \"mt-4\"]}>\n {tile.title}\n </Heading>\n {tile.takeaway && (\n <p class=\"m-0 mt-2 line-clamp-2 text-sm leading-relaxed text-muted-foreground\">{tile.takeaway}</p>\n )}\n\n <div class=\"mt-auto flex items-center gap-3 pt-5\">\n {faces.length > 0 && (\n <span class=\"flex shrink-0 -space-x-2\" aria-hidden=\"true\">\n {faces.map((face) => (\n <img src={face.avatarUrl} alt=\"\" width=\"28\" height=\"28\" loading=\"lazy\" decoding=\"async\" class=\"h-7 w-7 rounded-full border-2 border-card bg-secondary object-cover\" />\n ))}\n {extra > 0 && (\n <span class=\"inline-flex h-7 min-w-7 items-center justify-center rounded-full border-2 border-card bg-secondary px-1 text-[10px] font-semibold tabular-nums text-secondary-foreground\">+{extra}</span>\n )}\n </span>\n )}\n <span class=\"min-w-0 flex-1 truncate text-2xs text-muted-foreground\">{namesText}</span>\n </div>\n {reviewedText && (\n <p class=\"m-0 mt-3 flex items-center justify-between border-t border-border pt-3 text-2xs text-muted-foreground\">\n <span>Reviewed <time datetime={tile.reviewedAt}>{reviewedText}</time></span>\n <span aria-hidden=\"true\" class=\"transition-transform group-hover:translate-x-0.5\">→</span>\n </p>\n )}\n</a>\n",
63
+ "type": "registry:component",
64
+ "target": "~/src/components/grove/collection-tile.astro"
65
+ },
66
+ {
67
+ "path": "default/components/grove/entry-avatar.astro",
68
+ "content": "---\n/** App icon: the record's logo or the GitHub owner's avatar, else initials. */\ninterface Props {\n src?: string;\n title: string;\n size?: 'md' | 'lg';\n}\nconst { src, title, size = 'md' } = Astro.props;\nconst box = size === 'lg' ? 'h-12 w-12 rounded-xl' : 'h-10 w-10 rounded-lg';\nconst initials = title.replace(/[^A-Za-z0-9 ]/g, '').split(/\\s+/).filter(Boolean).slice(0, 2).map((w) => w[0]).join('').toUpperCase() || title.slice(0, 2).toUpperCase();\n---\n{src ? (\n <img src={src} alt=\"\" width={size === 'lg' ? 48 : 40} height={size === 'lg' ? 48 : 40} loading=\"lazy\" decoding=\"async\" class={`${box} shrink-0 border border-border bg-background object-cover`} />\n) : (\n <span aria-hidden=\"true\" class={`${box} inline-flex shrink-0 items-center justify-center border border-border bg-secondary text-sm font-semibold text-secondary-foreground`}>{initials}</span>\n)}\n",
69
+ "type": "registry:component",
70
+ "target": "~/src/components/grove/entry-avatar.astro"
71
+ },
72
+ {
73
+ "path": "default/components/grove/entry-chips.astro",
74
+ "content": "---\n/** Small neutral chips (platforms, tags). */\ninterface Props {\n items: string[];\n}\nconst items = [...new Set(Astro.props.items.filter(Boolean))];\n---\n{items.length > 0 && (\n <ul class=\"m-0 mt-3 flex list-none flex-wrap gap-1.5 p-0\">\n {items.map((item) => (\n <li class=\"m-0 rounded-full border border-border px-2 py-0.5 text-2xs font-medium text-muted-foreground\">{item}</li>\n ))}\n </ul>\n)}\n",
75
+ "type": "registry:component",
76
+ "target": "~/src/components/grove/entry-chips.astro"
77
+ },
78
+ {
79
+ "path": "default/components/grove/entry-metrics.astro",
80
+ "content": "---\n/** Stars · last push · licence, with icons. Renders nothing when all are missing. */\nimport { formatRelative, formatStars, isDetectedLicense, licenseDisplay } from '@grove-dev/core';\n\ninterface Props {\n stars?: number;\n pushedAt?: string;\n /** SPDX id or a display label; placeholders are dropped. */\n license?: string;\n /** Top border, for the foot of a card. */\n bordered?: boolean;\n}\nconst { stars, pushedAt, bordered = false } = Astro.props;\n// GitHub's placeholders (NOASSERTION, OTHER…) say nothing useful here.\nconst license = isDetectedLicense(Astro.props.license) ? licenseDisplay(Astro.props.license) : undefined;\nconst starsText = typeof stars === 'number' && stars > 0 ? formatStars(stars) : undefined;\nconst pushedText = pushedAt ? formatRelative(pushedAt) : undefined;\n---\n{(starsText || pushedText || license) && (\n <p class:list={[\"m-0 mt-1.5 flex flex-wrap items-center gap-x-4 gap-y-1 text-2xs text-muted-foreground\", bordered && \"border-t border-border pt-3\"]}>\n {starsText && (\n <span class=\"inline-flex items-center gap-1 tabular-nums\" title={`${stars?.toLocaleString('en')} GitHub stars`}>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"currentColor\" class=\"text-warning\"><path d=\"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z\"></path></svg>\n {starsText}<span class=\"sr-only\"> stars</span>\n </span>\n )}\n {pushedText && (\n <span class=\"inline-flex items-center gap-1\" title=\"Last push to the repository\">\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"><circle cx=\"8\" cy=\"8\" r=\"6.25\"></circle><path d=\"M8 4.75V8l2.25 1.5\"></path></svg>\n <span><span class=\"sr-only\">Last commit </span>{pushedText}</span>\n </span>\n )}\n {license && (\n <span class=\"inline-flex items-center gap-1\">\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 1.75v12.5M3.25 4.25h9.5M4.75 4.25 2.5 9a2.25 2.25 0 0 0 4.5 0L4.75 4.25ZM11.25 4.25 9 9a2.25 2.25 0 0 0 4.5 0l-2.25-4.75ZM5.5 14.25h5\"></path></svg>\n {license}\n </span>\n )}\n </p>\n)}\n",
81
+ "type": "registry:component",
82
+ "target": "~/src/components/grove/entry-metrics.astro"
53
83
  }
54
84
  ],
55
85
  "meta": {
56
- "version": "1.3.0",
57
- "requiresGrove": "0.18.0"
86
+ "version": "1.4.0",
87
+ "requiresGrove": "0.19.0"
58
88
  },
59
89
  "type": "registry:block"
60
90
  }
@@ -10,14 +10,14 @@
10
10
  "files": [
11
11
  {
12
12
  "path": "default/pages/contributors.astro",
13
- "content": "---\n/**\n * Contributors page — full list with per-user contribution counts.\n *\n * Generic: works for any blueprint (project-directory, resource-hub,\n * ecosystem-map) and any source of contributors. Reads from\n * `data/generated/contributors.json` if present, otherwise renders\n * a graceful empty state. The file is produced by the\n * `sync-contributors` GitHub Action (see `.github/workflows/`).\n *\n * The list represents contributors to the directory's own source\n * repository. Project owners in the directory are a separate metric.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getContributorsPageModel } from '@grove-dev/astro/server';\nimport EmptyState from '../components/ui/empty-state.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\n\nconst {\n contributors: sorted,\n total,\n seo,\n contributorsGraphHref,\n showContributionCount,\n} = getContributorsPageModel(siteConfig);\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <section class=\"py-12 sm:py-16\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Community\n </span>\n <h1 class=\"m-0 mt-2 text-[2rem] sm:text-[2.5rem] font-semibold leading-[1.05] tracking-tight text-ink-900 dark:text-ink-100\">\n {total > 0 ? `${total} community contributors` : \"Community\"}\n </h1>\n <p class=\"m-0 mt-3 max-w-2xl text-base leading-relaxed text-ink-700 dark:text-ink-200\">\n {total > 0\n ? `People who have improved ${siteConfig.name} through code, curation, and review.`\n : `Community profiles will appear after ${siteConfig.name} syncs its source repository metadata.`}\n </p>\n\n {contributorsGraphHref && (\n <p class=\"m-0 mt-3 text-sm text-ink-500 dark:text-ink-400\">\n <a\n href={contributorsGraphHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"font-medium underline decoration-ink-300 underline-offset-2 hover:decoration-ink-500 dark:decoration-ink-700 dark:hover:decoration-ink-400\"\n >\n GitHub contributors graph →\n </a>\n </p>\n )}\n </div>\n </section>\n\n {sorted.length === 0 ? (\n <section class=\"pb-12 sm:pb-16\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <EmptyState\n title=\"No contributors synced yet\"\n description={`Contributor profiles come from data/generated/contributors.json, written by the weekly sync-contributors workflow. Run \"grove sync contributors\" (or wait for the scheduled sync) and every contributor avatar lands here.`}\n action={contributorsGraphHref\n ? { label: \"View contributors on GitHub\", href: contributorsGraphHref }\n : undefined}\n />\n </div>\n </section>\n ) : (\n <section class=\"py-12 sm:py-16\" aria-label=\"Contributors list\">\n <div class=\"mx-auto w-full max-w-container px-5 pb-16 sm:px-7\">\n <ul\n class=\"m-0 grid list-none grid-cols-2 gap-3 p-0 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6\"\n aria-label=\"Contributors\"\n >\n {sorted.map((c) => {\n const href = c.profileUrl ?? `https://github.com/${c.username}`;\n const avatar =\n c.avatarUrl ??\n `https://avatars.githubusercontent.com/${c.username}?v=4&s=80`;\n return (\n <li class=\"m-0 p-0\">\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"group rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors flex flex-col items-center gap-2 p-3 text-center no-underline hover:border-ink-300 dark:hover:border-ink-700\"\n data-event=\"contributor_click\"\n data-event-source=\"contributors_page\"\n >\n <img\n src={avatar}\n alt={c.name ?? c.username}\n width=\"56\"\n height=\"56\"\n loading=\"lazy\"\n decoding=\"async\"\n class=\"h-14 w-14 rounded-full border border-ink-200 object-cover dark:border-ink-800\"\n />\n <span class=\"line-clamp-1 text-sm font-medium text-ink-700 group-hover:text-ink-900 dark:text-ink-300 dark:group-hover:text-ink-100\">\n {c.name ?? c.username}\n </span>\n <span class=\"text-2xs text-ink-500 dark:text-ink-400\">\n @{c.username}\n </span>\n {showContributionCount && typeof c.contributions === \"number\" && (\n <span class=\"font-mono text-2xs text-ink-400\">\n {c.contributions.toLocaleString()} contributions\n </span>\n )}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n </section>\n )}\n</BaseLayout>\n",
13
+ "content": "---\n/**\n * Contributors page — full list with per-user contribution counts.\n *\n * Generic: works for any blueprint (project-directory, resource-hub,\n * ecosystem-map) and any source of contributors. Reads from\n * `data/generated/contributors.json` if present, otherwise renders\n * a graceful empty state. The file is produced by the\n * `sync-contributors` GitHub Action (see `.github/workflows/`).\n *\n * The list represents contributors to the directory's own source\n * repository. Project owners in the directory are a separate metric.\n */\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getContributorsPageModel, getSubmissionsBySubmitter } from '@grove-dev/astro/server';\nimport EmptyState from '../components/ui/empty-state.astro';\nimport BaseLayout from '../layouts/base-layout.astro';\n\nconst {\n contributors: sorted,\n total,\n seo,\n contributorsGraphHref,\n showContributionCount,\n} = getContributorsPageModel(siteConfig);\n// Records per `submittedBy`; the ids are what a record page's\n// \"Submitted by @login\" links to.\nconst submitters = getSubmissionsBySubmitter(siteConfig);\nconst submittedTotal = submitters.reduce((n, p) => n + p.items.length, 0);\n---\n\n<BaseLayout title={seo.title} description={seo.description} image={seo.image} jsonLd={seo.jsonLd} site={siteConfig}>\n <section class=\"py-12 sm:py-16\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <span class=\"text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400\">\n Community\n </span>\n <h1 class=\"m-0 mt-2 text-[2rem] sm:text-[2.5rem] font-semibold leading-[1.05] tracking-tight text-ink-900 dark:text-ink-100\">\n {total > 0 ? `${total} community contributors` : \"Community\"}\n </h1>\n <p class=\"m-0 mt-3 max-w-2xl text-base leading-relaxed text-ink-700 dark:text-ink-200\">\n {total > 0\n ? `People who have improved ${siteConfig.name} through code, curation, and review.`\n : `Community profiles will appear after ${siteConfig.name} syncs its source repository metadata.`}\n </p>\n\n {contributorsGraphHref && (\n <p class=\"m-0 mt-3 text-sm text-ink-500 dark:text-ink-400\">\n <a\n href={contributorsGraphHref}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"font-medium underline decoration-ink-300 underline-offset-2 hover:decoration-ink-500 dark:decoration-ink-700 dark:hover:decoration-ink-400\"\n >\n GitHub contributors graph →\n </a>\n </p>\n )}\n </div>\n </section>\n\n {submitters.length > 0 && (\n <section aria-labelledby=\"submitted-heading\" class=\"pb-4\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <h2 id=\"submitted-heading\" class=\"m-0 text-[1.25rem] font-semibold tracking-tight text-foreground\">\n Added by the community\n </h2>\n <p class=\"m-0 mt-1 text-sm text-muted-foreground\">\n {submittedTotal} {submittedTotal === 1 ? \"entry\" : \"entries\"} came in from {submitters.length} {submitters.length === 1 ? \"person\" : \"people\"}. Each page credits who submitted it.\n </p>\n <ul class=\"m-0 mt-4 grid list-none grid-cols-1 gap-2 p-0 sm:grid-cols-2 lg:grid-cols-3\">\n {submitters.map((person) => (\n <li id={person.id} class=\"m-0 flex scroll-mt-24 items-start gap-3 rounded-[var(--radius-lg)] border border-border bg-card p-3 target:border-ring target:ring-3 target:ring-ring/35\">\n <img src={`https://github.com/${person.login}.png?size=64`} alt=\"\" width=\"32\" height=\"32\" loading=\"lazy\" decoding=\"async\" class=\"h-8 w-8 shrink-0 rounded-full border border-border\" />\n <div class=\"min-w-0\">\n <a href={`https://github.com/${person.login}`} target=\"_blank\" rel=\"noopener\" class=\"text-sm font-semibold text-foreground no-underline hover:underline\" data-event=\"contributor_click\" data-event-source=\"submitted_by\">\n @{person.login}\n </a>\n <p class=\"m-0 mt-0.5 text-sm leading-snug text-muted-foreground\">\n {person.items.map((item, i) => (\n <>{i > 0 && \", \"}<a href={item.url} class=\"text-muted-foreground underline decoration-border underline-offset-2 hover:text-foreground\">{item.name}</a></>\n ))}\n </p>\n </div>\n </li>\n ))}\n </ul>\n </div>\n </section>\n )}\n\n {sorted.length === 0 ? (\n <section class=\"pb-12 sm:pb-16\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <EmptyState\n title=\"No contributors synced yet\"\n description={`Contributor profiles come from data/generated/contributors.json, written by the weekly sync-contributors workflow. Run \"grove sync contributors\" (or wait for the scheduled sync) and every contributor avatar lands here.`}\n action={contributorsGraphHref\n ? { label: \"View contributors on GitHub\", href: contributorsGraphHref }\n : undefined}\n />\n </div>\n </section>\n ) : (\n <section class=\"py-12 sm:py-16\" aria-label=\"Contributors list\">\n <div class=\"mx-auto w-full max-w-container px-5 pb-16 sm:px-7\">\n <ul\n class=\"m-0 grid list-none grid-cols-2 gap-3 p-0 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6\"\n aria-label=\"Contributors\"\n >\n {sorted.map((c) => {\n const href = c.profileUrl ?? `https://github.com/${c.username}`;\n const avatar =\n c.avatarUrl ??\n `https://avatars.githubusercontent.com/${c.username}?v=4&s=80`;\n return (\n <li class=\"m-0 p-0\">\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener\"\n class=\"group rounded-[calc(var(--radius)+0.25rem)] border border-border bg-card shadow-none transition-colors flex flex-col items-center gap-2 p-3 text-center no-underline hover:border-ink-300 dark:hover:border-ink-700\"\n data-event=\"contributor_click\"\n data-event-source=\"contributors_page\"\n >\n <img\n src={avatar}\n alt={c.name ?? c.username}\n width=\"56\"\n height=\"56\"\n loading=\"lazy\"\n decoding=\"async\"\n class=\"h-14 w-14 rounded-full border border-ink-200 object-cover dark:border-ink-800\"\n />\n <span class=\"line-clamp-1 text-sm font-medium text-ink-700 group-hover:text-ink-900 dark:text-ink-300 dark:group-hover:text-ink-100\">\n {c.name ?? c.username}\n </span>\n <span class=\"text-2xs text-ink-500 dark:text-ink-400\">\n @{c.username}\n </span>\n {showContributionCount && typeof c.contributions === \"number\" && (\n <span class=\"font-mono text-2xs text-ink-400\">\n {c.contributions.toLocaleString()} contributions\n </span>\n )}\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n </section>\n )}\n</BaseLayout>\n",
14
14
  "type": "registry:page",
15
15
  "target": "~/src/pages/contributors.astro"
16
16
  }
17
17
  ],
18
18
  "meta": {
19
- "version": "1.3.0",
20
- "requiresGrove": "0.18.0"
19
+ "version": "1.4.0",
20
+ "requiresGrove": "0.19.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }